package com.ruku.controller;

import com.bean.WmsTBillDetails;
import com.bean.WmsTSite;
import com.ruku.service.RuKuService;
import com.ruku.service.Ruku2Service;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping("ruku2")
public class SelectController {
    @Autowired
    RuKuService ruKuService;
    @Autowired
    Ruku2Service ruku2Service;
    @RequestMapping("select.do")
    public List<WmsTSite> ruKu(String storeid) {
        System.out.println(storeid);
        List<WmsTSite> sites = ruKuService.selectSite(storeid);
        System.out.println(sites);
        return sites;
    }

    @RequestMapping("getAll.do")
    public List<WmsTBillDetails> getAll(String billID) {
        List<WmsTBillDetails> wmsTBillDetails = ruku2Service.selectBill(billID);
        System.out.println("123049581958"+wmsTBillDetails);
        return wmsTBillDetails;
    }
}
